package com.ikun.usercenter.service;

import com.ikun.usercenter.domain.User;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletRequest;

/**
* @author 23854
* @description 针对表【user(用户)】的数据库操作Service
* @createDate 2023-09-18 19:58:38
*/

@Service
public interface UserService extends IService<User> {

    /**
     * 用户注册
     * @param userAccount 用户账户
     * @param userPassword 用户密码
     * @param checkPassword 校验密码
     * @return 新用户id
     */

    Long userRegister(String userAccount,String userPassword,String checkPassword,String GenshinUID);

    /**
     * 用户登录
     * @param userAccount 用户账户
     * @param userPassword 用户密码
     * @return 脱敏后的用户信息
     */

    User userLogin(String userAccount, String userPassword, HttpServletRequest request);


    /**
     * 用户脱敏
     * @param originUser  原用户信息
     * @return  脱敏后的用户信息
     */
    User getSafeUser(User originUser);


    /**
     * 用户注销
     * @param request
     * @return
     */
    int userLogout(HttpServletRequest request);
}
